package com.xie.pojo;


import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Table(name = "zy_tj")
@Data
public class BaiduWapTj {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;
    private String zyname;
    private String zyurl;
    private String zypassword;
    private Integer uid;
    private Integer type;

    @Transient
    private String uname;
    @Transient
    private String typeStr;

    public String getTypeStr() {
        switch (type){
            case 1:
                typeStr="视频资源";
                break;
            case 2:
                typeStr="图书资源";
                break;
            default:
                typeStr="其他资源";
                break;

        }

        return typeStr;
    }
}
